package net.lunjin.dao;

import java.math.BigDecimal;
import java.util.List;

import net.lunjin.bean.News;
import finaler.db.BaseDao;
import finaler.util.Page;
import finaler.util.PageList;

public interface NewsDao extends BaseDao<News> {

    public PageList getBbsList(Page page) throws Exception ;
    
    public PageList getNewsList(Page page) throws Exception ;

    public News findByTitle(String title,int newsType) throws Exception ;
    
	public List<News> getBbsTopRecord(int limit) throws Exception;
	
	public List<News> getTopRecord(int newsType, int limit) throws Exception;
	
	public List<News> getHotRecord(int newsType, int limit) throws Exception;
	
	public List<News> getRandomRecord(int newsType,int limit) throws Exception;
	public List<News> getBeforeAfterList(BigDecimal newsId,BigDecimal newsType) throws Exception;
	public void autoUpdateHit()throws Exception;

	public News getRandomBBSRecord() throws Exception ;
	public News getByBaiduId(String baiduid) throws Exception;
	

    public PageList getAll(Page page) throws Exception ;
}
